package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AppUserWhitelistMapper;
import com.ruoyi.system.domain.AppUserWhitelist;
import com.ruoyi.system.service.IAppUserWhitelistService;

/**
 * app用户-白名单Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-03
 */
@Service
public class AppUserWhitelistServiceImpl implements IAppUserWhitelistService 
{
    @Autowired
    private AppUserWhitelistMapper appUserWhitelistMapper;

    /**
     * 查询app用户-白名单
     * 
     * @param id app用户-白名单主键
     * @return app用户-白名单
     */
    @Override
    public AppUserWhitelist selectAppUserWhitelistById(Long id)
    {
        return appUserWhitelistMapper.selectAppUserWhitelistById(id);
    }

    /**
     * 查询app用户-白名单列表
     * 
     * @param appUserWhitelist app用户-白名单
     * @return app用户-白名单
     */
    @Override
    public List<AppUserWhitelist> selectAppUserWhitelistList(AppUserWhitelist appUserWhitelist)
    {
        return appUserWhitelistMapper.selectAppUserWhitelistList(appUserWhitelist);
    }

    /**
     * 新增app用户-白名单
     * 
     * @param appUserWhitelist app用户-白名单
     * @return 结果
     */
    @Override
    public int insertAppUserWhitelist(AppUserWhitelist appUserWhitelist)
    {
        appUserWhitelist.setCreateTime(DateUtils.getNowDate());
        return appUserWhitelistMapper.insertAppUserWhitelist(appUserWhitelist);
    }

    /**
     * 修改app用户-白名单
     * 
     * @param appUserWhitelist app用户-白名单
     * @return 结果
     */
    @Override
    public int updateAppUserWhitelist(AppUserWhitelist appUserWhitelist)
    {
        return appUserWhitelistMapper.updateAppUserWhitelist(appUserWhitelist);
    }

    /**
     * 批量删除app用户-白名单
     * 
     * @param ids 需要删除的app用户-白名单主键
     * @return 结果
     */
    @Override
    public int deleteAppUserWhitelistByIds(Long[] ids)
    {
        return appUserWhitelistMapper.deleteAppUserWhitelistByIds(ids);
    }

    /**
     * 删除app用户-白名单信息
     * 
     * @param id app用户-白名单主键
     * @return 结果
     */
    @Override
    public int deleteAppUserWhitelistById(Long id)
    {
        return appUserWhitelistMapper.deleteAppUserWhitelistById(id);
    }
}
